# delimit ;
clear ;
set more off ;
pause on ;
cd "R:/personlig/fenellac/menarche_replication/analysis" ;

* **************************************************************************** ;
* This is the master do-file that runs the do files in the "/analysis/code" folder
* in the correct order.
*
* Paper: "Age of Marriage and Women's Political Engagement: Evidence from India"
* Authors: Fenella Carpena, Francesca Jensenius
* 
* Code by Fenella Carpena
* Last update: April 28, 2020
* **************************************************************************** ;

* **************************************************************************** ;
* get data that was produced from "/build/code" ;
* **************************************************************************** ;
do "./code/get-input-data.do" ;

* **************************************************************************** ;
* main tables 
* **************************************************************************** ;
do "./code/table01-IV-political.do" ;
do "./code/table02-IV-educ-and-num-children.do" ;
do "./code/table03-hetero-educ.do" ;
do "./code/table04-hetero-children-with-resp.do" ;

* **************************************************************************** ;
* appendix A
* **************************************************************************** ;
do "./code/app-A-table01-OLS-married-vs-not-married.do" ;
do "./code/app-A-table02-hetero-length-of-marriage.do" ;

* **************************************************************************** ;
* appendix B
* **************************************************************************** ;
do "./code/app-B-table01-summ-stats.do" ;
do "./code/app-B-figure01-distributions.do" ;

* **************************************************************************** ;
* appendix C
* **************************************************************************** ;
do "./code/app-C-table01-03-first-stage.do" ;

* **************************************************************************** ;
* appendix D
* **************************************************************************** ;
do "./code/app-D-figure01-menarche-age-comparison.do" ;

* Note: Appendix Table D1 was created manually (i.e., not from Stata code) ; 

* **************************************************************************** ;
* appendix E
* **************************************************************************** ;
do "./code/app-E-table01-robustness-controlling-for-years-educ.do" ;
do "./code/app-E-table02-robustness-controlling-for-ever-schooled.do" ;
do "./code/app-E-table03-robustness-instrument-dummies.do" ;

* **************************************************************************** ;
* appendix F
* **************************************************************************** ;
do "./code/app-F-table01-effect-of-menarche-age-on-political-participation.do" ;
do "./code/app-F-table02-mediation-analysis.do" ;
* do "./code/app-F-figure01-sensitivity-analysis.do" ;

* Note: The code for Appendix Figure F1 takes a long time to run so it has been commented out ;
* The .tex file for Appendix Table F2, Panel C was created manually using the results from "app-F-table02-mediation-analysis.do" ;

* **************************************************************************** ;
* appendix G
* **************************************************************************** ;
do "./code/app-G-table01-IV-employment.do" ;
do "./code/app-G-table02-IV-mobility.do" ;
do "./code/app-G-table03-IV-HH-decisions.do" ; 

exit ;




	
